const DB = require("../config/dbconfig"); // 导入数据库配置文件
const Sequelize = require("sequelize"); // 导入模块


// stu是数据库的表名
const waterModel = DB.define("water_data_denosing", {
    id: {
        primaryKey: true,
        type: Sequelize.INTEGER, // 数据类型改为INTEGER
        field: "index",
        autoIncrement: true // 自增
    },
    well_num: {
        type: Sequelize.STRING(50), // 数据类型改为STRING(30)
        defaultValue: null, // 默认值为null
        field: "井号"
    },
    cengwei_num: {
        type: Sequelize.STRING(50), 
        defaultValue: null, 
        field: "层位"
    },
    date: {
        type: Sequelize.DATE, 
        defaultValue: null, 
        field: "生产日期"
    },
    time: {
        type: Sequelize.DOUBLE, 
        defaultValue: null, 
        field: "生产时间"
    },
    gasPerDay: {
        type: Sequelize.DOUBLE,
        defaultValue: null,
        field: "日产气"
    },
    waterPerDay: {
        type: Sequelize.DOUBLE,
        defaultValue: null,
        field: "日产水"
    },
    avgOilPressure: {
        type: Sequelize.DOUBLE,
        defaultValue: null,
        field: "平均油压"
    },
    avgCasingPressure: {
        type: Sequelize.DOUBLE,
        defaultValue: null,
        field: "平均套压"
    },
    outputPressure: {
        type: Sequelize.DOUBLE,
        defaultValue: null,
        field: "输压"
    },
    diffOC: {
        type: Sequelize.DOUBLE,
        defaultValue: null,
        field: "套油压差"
    },
    ratioWG: {
        type: Sequelize.DOUBLE,
        defaultValue: null,
        field: "水气比"
    },
    


}, {
    freezeTableName: true,
    timestamps: false
});

module.exports = waterModel;